package cn.wgx.modules.sys.entity;

import cn.wgx.modules.base.entity.BaseEntity;

import java.io.Serializable;
import java.util.Date;

/**
 * Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
 * Description:
 * 系统角色表
 *
 * @author
 */
public class SysRole extends BaseEntity implements Serializable {

    /**
     * 更新时间
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private Date updateDate;

    /**
     * 父角色id
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private Integer parentId;

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private static final long serialVersionUID = 1L;

    /**
     * 创建人
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private Integer createUserId;

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private Integer role_id;

    /**
     * 角色值
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private String roleKey;

    /**
     * 排序
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private Integer sort;

    /**
     * 角色名称
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private String roleName;

    /**
     * 类型（管理员=1;  平台教师=2 ;教师=3; 学生=4; )
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private Integer type;

    /**
     * 备注
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private String remark;

    /**
     * 更新人
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private Integer updateUserId;

    /**
     * 状态
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private Integer status;

    /**
     * 创建时间
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    private Date createDate;

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withRole_id(Integer role_id) {
        this.setRole_id(role_id);
        return this;
    }

    /**
     * This method returns the value of the database column education..sys_role.type
     *
     * @return the value of education..sys_role.type
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public Integer getType() {
        return type;
    }

    /**
     * This method returns the value of the database column education..sys_role.createDate
     *
     * @return the value of education..sys_role.createDate
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     * This method sets the value of the database column education..sys_role.parentId
     *
     * @param parentId the value for education..sys_role.parentId
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    /**
     * This method sets the value of the database column education..sys_role.updateDate
     *
     * @param updateDate the value for education..sys_role.updateDate
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    /**
     * This method sets the value of the database column education..sys_role.sort
     *
     * @param sort the value for education..sys_role.sort
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setSort(Integer sort) {
        this.sort = sort;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withUpdateDate(Date updateDate) {
        this.setUpdateDate(updateDate);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_role.roleName
     *
     * @param roleName the value for education..sys_role.roleName
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withCreateUserId(Integer createUserId) {
        this.setCreateUserId(createUserId);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_role.type
     *
     * @param type the value for education..sys_role.type
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * This method sets the value of the database column education..sys_role.updateUserId
     *
     * @param updateUserId the value for education..sys_role.updateUserId
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    /**
     * This method returns the value of the database column education..sys_role.status
     *
     * @return the value of education..sys_role.status
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * This method returns the value of the database column education..sys_role.sort
     *
     * @return the value of education..sys_role.sort
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public Integer getSort() {
        return sort;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withRoleName(String roleName) {
        this.setRoleName(roleName);
        return this;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withRemark(String remark) {
        this.setRemark(remark);
        return this;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRole_id() == null) ? 0 : getRole_id().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getRoleName() == null) ? 0 : getRoleName().hashCode());
        result = prime * result + ((getRoleKey() == null) ? 0 : getRoleKey().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        return result;
    }

    /**
     * This method returns the value of the database column education..sys_role.roleKey
     *
     * @return the value of education..sys_role.roleKey
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public String getRoleKey() {
        return roleKey;
    }

    /**
     * This method returns the value of the database column education..sys_role.createUserId
     *
     * @return the value of education..sys_role.createUserId
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public Integer getCreateUserId() {
        return createUserId;
    }

    /**
     * This method sets the value of the database column education..sys_role.roleKey
     *
     * @param roleKey the value for education..sys_role.roleKey
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setRoleKey(String roleKey) {
        this.roleKey = roleKey;
    }

    /**
     * This method returns the value of the database column education..sys_role.updateDate
     *
     * @return the value of education..sys_role.updateDate
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public Date getUpdateDate() {
        return updateDate;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withRoleKey(String roleKey) {
        this.setRoleKey(roleKey);
        return this;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysRole other = (SysRole) that;
        return (this.getRole_id() == null ? other.getRole_id() == null : this.getRole_id().equals(other.getRole_id())) && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId())) && (this.getRoleName() == null ? other.getRoleName() == null : this.getRoleName().equals(other.getRoleName())) && (this.getRoleKey() == null ? other.getRoleKey() == null : this.getRoleKey().equals(other.getRoleKey())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark())) && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId())) && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate())) && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId())) && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()));
    }

    /**
     * This method returns the value of the database column education..sys_role.updateUserId
     *
     * @return the value of education..sys_role.updateUserId
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public Integer getUpdateUserId() {
        return updateUserId;
    }

    /**
     * This method sets the value of the database column education..sys_role.remark
     *
     * @param remark the value for education..sys_role.remark
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * This method sets the value of the database column education..sys_role.createUserId
     *
     * @param createUserId the value for education..sys_role.createUserId
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * This method returns the value of the database column education..sys_role.parentId
     *
     * @return the value of education..sys_role.parentId
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public Integer getParentId() {
        return parentId;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withSort(Integer sort) {
        this.setSort(sort);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_role.status
     *
     * @param status the value for education..sys_role.status
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", role_id=").append(role_id);
        sb.append(", parentId=").append(parentId);
        sb.append(", roleName=").append(roleName);
        sb.append(", roleKey=").append(roleKey);
        sb.append(", type=").append(type);
        sb.append(", sort=").append(sort);
        sb.append(", status=").append(status);
        sb.append(", remark=").append(remark);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateUserId=").append(updateUserId);
        sb.append(", updateDate=").append(updateDate);
        sb.append("]");
        return sb.toString();
    }

    /**
     * This method sets the value of the database column education..sys_role.createDate
     *
     * @param createDate the value for education..sys_role.createDate
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withParentId(Integer parentId) {
        this.setParentId(parentId);
        return this;
    }

    /**
     * This method returns the value of the database column education..sys_role.role_id
     *
     * @return the value of education..sys_role.role_id
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public Integer getRole_id() {
        return role_id;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withUpdateUserId(Integer updateUserId) {
        this.setUpdateUserId(updateUserId);
        return this;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withType(Integer type) {
        this.setType(type);
        return this;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withCreateDate(Date createDate) {
        this.setCreateDate(createDate);
        return this;
    }

    /**
     * This method returns the value of the database column education..sys_role.remark
     *
     * @return the value of education..sys_role.remark
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public String getRemark() {
        return remark;
    }

    /**
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public SysRole withStatus(Integer status) {
        this.setStatus(status);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_role.role_id
     *
     * @param role_id the value for education..sys_role.role_id
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public void setRole_id(Integer role_id) {
        this.role_id = role_id;
    }

    /**
     * This method returns the value of the database column education..sys_role.roleName
     *
     * @return the value of education..sys_role.roleName
     *
     * @mbg.generated Tue Jan 14 16:26:49 CST 2020
     */
    public String getRoleName() {
        return roleName;
    }
}
